import React from 'react'
import { connect } from 'react-redux'

import {
    RecommandWrapp,
    RecommandItem
} from '../style'

class Recommand extends React.Component{

    render(){
        return(
           <RecommandWrapp>
               {
                   this.props.recommandlist.map((item)=>{
                       return (
                            <RecommandItem key={item.get('id')} imgUrl={item.get('imgUrl')}/>   
                       )
                   })
               }  
              
           </RecommandWrapp>
        )
    }
}


const mapStateToProps = (state) => ({
    recommandlist: state.getIn(['home', 'recommendList'])
})

export default connect(mapStateToProps, null)(Recommand)